package org.hzz.promotions.types.enums.coupon;

import io.gitee.pkmer.convention.enums.BaseEnum;
import io.gitee.pkmer.convention.enums.BaseEnumTemplate;
import lombok.Getter;

/**
 * @author <a href="mailto:1193094618@qq.com">pkmer</a>
 * <br>
 * <a href = "https://gitee.com/developeros/videos-online">Code Repository</a>
 * At 2024/8/31
 * 使用限制方式
 */
@Getter
public enum TermType implements BaseEnum<Byte> {
    DAYS((byte)0,"固定天数"),
    FIXED_TIME((byte)1,"固定时间段");

    private final Byte value;
    private final String desc;

    TermType(Byte value,String desc){
        this.value = value;
        this.desc = desc;
    }

    public static TermType fromValue(Byte value){
        return BaseEnumTemplate.fromByteValue(TermType.class,value);
    }
}
